<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
    <meta charset="UTF-8"/>
    <title><?php echo $title; ?></title>
    <base href="<?php echo $base; ?>"/>
    <?php if ($description) { ?>
    <meta name="description" content="<?php echo $description; ?>"/>
    <?php } ?>
    <?php if ($keywords) { ?>
    <meta name="keywords" content="<?php echo $keywords; ?>"/>
    <?php } ?>
    <?php foreach ($links as $link) { ?>
    <link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>"/>
    <?php } ?>
    <link rel="stylesheet" type="text/css" href="view/stylesheet/stylesheet.css"/>
    <?php foreach ($styles as $style) { ?>
    <link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>"
          media="<?php echo $style['media']; ?>"/>
    <?php } ?>
    <script type="text/javascript" src="view/javascript/jquery/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
    <link type="text/css" href="view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css"
          rel="stylesheet"/>
    <script type="text/javascript" src="view/javascript/jquery/tabs.js"></script>
    <script type="text/javascript" src="view/javascript/jquery/superfish/js/superfish.js"></script>
    <script type="text/javascript" src="view/javascript/common.js"></script>

    <!--//tooltipster tooltip -->
    <link rel="stylesheet" type="text/css" href="view/javascript/tooltip/css/tooltipster.css"/>
    <script type="text/javascript" src="view/javascript/tooltip/jquery.tooltipster.min.js"></script>
    <?php foreach ($scripts as $script) { ?>
    <script type="text/javascript" src="<?php echo $script; ?>"></script>
    <?php } ?>
    <script type="text/javascript">
        //-----------------------------------------
        // Confirm Actions (delete, uninstall)
        //-----------------------------------------
        $(document).ready(function () {
            // Confirm Delete
            $('#form').submit(function () {
                if ($(this).attr('action').indexOf('delete', 1) != -1) {
                    if (!confirm('<?php echo $text_confirm; ?>')) {
                        return false;
                    }
                }
            });
            // Confirm Uninstall
            $('a').click(function () {
                if ($(this).attr('href') != null && $(this).attr('href').indexOf('uninstall', 1) != -1) {
                    if (!confirm('<?php echo $text_confirm; ?>')) {
                        return false;
                    }
                }
            });
        });
    </script>
</head>
<body>
<div id="container">
<div id="header">
<div class="div1">
    <div class="div2"><img src="view/image/logo_partner.png" title="<?php echo $heading_title; ?>"
                           onclick="location = '<?php echo $home; ?>'"/></div>
    <?php if ($logged) { ?>
    <div class="div3"><img src="view/image/lock.png" alt=""
                           style="position: relative; top: 3px;"/>&nbsp;<?php echo $logged; ?></div>
    <?php } ?>
</div>
<?php if ($logged) { ?>
<div id="menu">
    <ul class="left" style="display: none;">
        <li id="dashboard"><a href="<?php echo $home; ?>" class="top"><?php echo $text_dashboard; ?></a></li>
        <li id="catalog"><a class="top">Products</a>
            <ul>
                <li><a href="<?php echo $product; ?>"><?php echo "Itineraries"; ?></a></li>
                <li><a href="<?php echo $deal; ?>"><?php echo "Deals"; ?></a></li>
                
            </ul>
        </li>
        <li id="sale"><a class="top">Orders</a> 
            <ul>
                <li><a href="<?php echo $order; ?>">Itinerary Order</a></li>
                <li><a href="<?php echo $dealorder; ?>">Deals Order</a></li>
                
            </ul>
        </li>
        <li id="sale"><a class="top">Setting</a> 
            <ul>
                <!--li><a href="<?php echo $aboutus; ?>">About us</a></li-->
                <li><a href="<?php echo $changepass; ?>">Change password</a></li>
                
            </ul>
        </li>
    </ul>
    <ul class="right" style="display: none;">
        
        <li id="store"><a href="/<?php echo DIR_ROOT_NAME ?>" target="_blank" class="top"><?php echo $text_front; ?></a>
            <ul>
                <?php foreach ($stores as $stores) { ?>
                <li><a href="<?php echo $stores['href']; ?>" target="_blank"><?php echo $stores['name']; ?></a></li>
                <?php } ?>
            </ul>
        </li>
        <li><a class="top" href="<?php echo $logout; ?>"><?php echo $text_logout; ?></a></li>
    </ul>
</div>
<?php } ?>
</div>
